<?php
    require_once('../../core.php');

	//Load Allys from ajax with a possible query search
    $sql = "SELECT * FROM ally ";
    
    if ( isset($_GET['q']) ) {
        $sql = "$sql
            WHERE name LIKE '%{$_GET['q']}%' ";
    }

    $sql = "$sql
            ORDER BY name ASC";

	$rows = $mobdb->query($sql);
	$allys = $mobdb->last_result;
    
    include '../templates/allyselectlist.php';
?>
